home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.1#0"; "COMDLG32.OCX"
- Object = "{52FC4A5B-67AB-11D2-8D50-0000B456D8CA}#10.0#0"; "DynaWav-Avi.ocx"
- Begin VB.Form Form1
- BorderStyle = 3 'Fixed Dialog
- Caption = "DynaWav-Avi V1.10 Visual Basic 5 example."
- ClientHeight = 6330
- ClientLeft = 45
- ClientTop = 330
- ClientWidth = 7755
- LinkTopic = "Form1"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 6330
- ScaleWidth = 7755
- ShowInTaskbar = 0 'False
- StartUpPosition = 3 'Windows Default
- Begin VB.Frame Frame2
- Caption = "Volume control"
- Height = 1335
- Left = 0
- TabIndex = 41
- Top = 4320
- Width = 7695
- Begin VB.TextBox Text5
- Height = 285
- Left = 6960
- TabIndex = 50
- Text = "5000"
- Top = 600
- Width = 615
- End
- Begin VB.TextBox Text4
- Height = 285
- Left = 5640
- TabIndex = 49
- Text = "0"
- Top = 600
- Width = 615
- End
- Begin VB.CommandButton Command12
- BackColor = &H00C0C0C0&
- Caption = "Automatic Fade"
- Height = 255
- Left = 4080
- TabIndex = 47
- Top = 240
- Width = 3495
- End
- Begin VB.CommandButton Command1
- Caption = "Set Volume"
- Enabled = 0 'False
- Height = 255
- Left = 120
- TabIndex = 43
- Top = 600
- Width = 2055
- End
- Begin VB.TextBox Text3
- Enabled = 0 'False
- Height = 285
- Left = 2160
- TabIndex = 42
- Text = "65535"
- Top = 600
- Width = 855
- End
- Begin VB.Label Label1
- BorderStyle = 1 'Fixed Single
- Caption = "During"
- Height = 255
- Index = 9
- Left = 6360
- TabIndex = 52
- Top = 600
- Width = 615
- End
- Begin VB.Label Label1
- BorderStyle = 1 'Fixed Single
- Caption = "Goto Volume value"
- Height = 255
- Index = 8
- Left = 4080
- TabIndex = 51
- Top = 600
- Width = 1575
- End
- Begin VB.Label Label2
- BorderStyle = 1 'Fixed Single
- Caption = "Current Volume:0"
- Height = 255
- Index = 11
- Left = 120
- TabIndex = 48
- Top = 960
- Width = 2895
- End
- Begin VB.Label Label3
- Alignment = 2 'Center
- BackColor = &H000000FF&
- Caption = "Fade Running"
- Height = 255
- Left = 4080
- TabIndex = 46
- Top = 960
- Visible = 0 'False
- Width = 3495
- End
- Begin VB.Label Label1
- BorderStyle = 1 'Fixed Single
- Caption = "Wave support volume"
- Height = 255
- Index = 10
- Left = 120
- TabIndex = 45
- Top = 240
- Width = 2055
- End
- Begin VB.Label Label2
- BorderStyle = 1 'Fixed Single
- Caption = "Label2"
- Height = 255
- Index = 10
- Left = 2160
- TabIndex = 44
- Top = 240
- Width = 855
- End
- End
- Begin VB.Frame Frame3
- Caption = "Wave-Avi Controls"
- Height = 2655
- Left = 0
- TabIndex = 8
- Top = 120
- Width = 7695
- Begin DynaWavAviPlayer.DynaWavAvi DynaWav1
- Height = 615
- Left = 4080
- Top = 1800
- Width = 615
- _ExtentX = 1085
- _ExtentY = 1085
- End
- Begin MSComDlg.CommonDialog CommonDialog1
- Left = 7200
- Top = -120
- _ExtentX = 847
- _ExtentY = 847
- _Version = 327681
- End
- Begin VB.CheckBox Check1
- Caption = "Play video in picture ?"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 8.25
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 255
- Left = 5280
- TabIndex = 39
- Top = 2160
- Width = 2295
- End
- Begin VB.PictureBox Picture1
- Appearance = 0 'Flat
- BackColor = &H80000005&
- ForeColor = &H80000008&
- Height = 1695
- Left = 5400
- ScaleHeight = 111
- ScaleMode = 3 'Pixel
- ScaleWidth = 143
- TabIndex = 38
- Top = 360
- Width = 2175
- End
- Begin VB.CommandButton Command11
- Caption = "..."
- Height = 255
- Left = 4920
- TabIndex = 37
- Top = 360
- Width = 375
- End
- Begin VB.CommandButton Command8
- Caption = "seek From"
- Height = 375
- Left = 1680
- TabIndex = 31
- Top = 1200
- Width = 855
- End
- Begin VB.TextBox Text2
- Height = 375
- Left = 2520
- TabIndex = 30
- Text = "0"
- Top = 1200
- Width = 855
- End
- Begin VB.CommandButton Command10
- Caption = "seek End"
- Height = 375
- Left = 3480
- TabIndex = 29
- Top = 1200
- Width = 855
- End
- Begin VB.CommandButton Command9
- Caption = "seek Start"
- Height = 375
- Left = 720
- TabIndex = 28
- Top = 1200
- Width = 855
- End
- Begin VB.CommandButton Command7
- Caption = "cls"
- Height = 855
- Left = 3360
- TabIndex = 27
- Top = 1680
- Width = 375
- End
- Begin VB.CommandButton Command6
- Caption = "Close"
- Height = 375
- Left = 3840
- TabIndex = 15
- Top = 720
- Width = 735
- End
- Begin VB.CommandButton Command5
- Caption = "Stop"
- Height = 375
- Left = 3000
- TabIndex = 14
- Top = 720
- Width = 735
- End
- Begin VB.CommandButton Command4
- Caption = "Pause"
- Height = 375
- Left = 2160
- TabIndex = 13
- Top = 720
- Width = 735
- End
- Begin VB.CommandButton Command3
- Caption = "Play"
- Height = 375
- Left = 1320
- TabIndex = 12
- Top = 720
- Width = 735
- End
- Begin VB.CommandButton Command2
- Caption = "Init"
- Height = 375
- Left = 480
- TabIndex = 11
- Top = 720
- Width = 735
- End
- Begin VB.TextBox Text1
- Height = 285
- Left = 1680
- TabIndex = 9
- Text = "d:\alan0030.wav"
- Top = 360
- Width = 3255
- End
- Begin VB.Label Label4
- BorderStyle = 1 'Fixed Single
- Caption = "Error String"
- Height = 615
- Index = 1
- Left = 120
- TabIndex = 26
- Top = 1920
- Width = 3255
- End
- Begin VB.Label Label4
- BorderStyle = 1 'Fixed Single
- Caption = "Error Code"
- Height = 255
- Index = 0
- Left = 120
- TabIndex = 25
- Top = 1680
- Width = 3255
- End
- Begin VB.Label Label1
- BorderStyle = 1 'Fixed Single
- Caption = "Wave/Avi Filename"
- Height = 255
- Index = 0
- Left = 120
- TabIndex = 10
- Top = 360
- Width = 1575
- End
- End
- Begin VB.Frame Frame1
- Caption = "Audio Informations"
- Height = 1575
- Left = 0
- TabIndex = 0
- Top = 2760
- Width = 7695
- Begin VB.Label Label7
- BorderStyle = 1 'Fixed Single
- Caption = "Label7"
- Height = 255
- Index = 1
- Left = 2640
- TabIndex = 54
- Top = 720
- Width = 1095
- End
- Begin VB.Label Label7
- BorderStyle = 1 'Fixed Single
- Caption = "Label7"
- Height = 255
- Index = 0
- Left = 2640
- TabIndex = 53
- Top = 960
- Width = 1095
- End
- Begin VB.Label Label2
- BorderStyle = 1 'Fixed Single
- Caption = "Label2"
- Height = 255
- Index = 9
- Left = 5400
- TabIndex = 36
- Top = 1200
- Width = 2175
- End
- Begin VB.Label Label1
- BorderStyle = 1 'Fixed Single
- Caption = "Device Type"
- Height = 255
- Index = 19
- Left = 3960
- TabIndex = 35
- Top = 1200
- Width = 1455
- End
- Begin VB.Label Label2
- BorderStyle = 1 'Fixed Single
- Caption = "Label2"
- Height = 255
- Index = 8
- Left = 5400
- TabIndex = 34
- Top = 720
- Width = 2175
- End
- Begin VB.Label Label1
- BorderStyle = 1 'Fixed Single
- Caption = "Frequence"
- Height = 255
- Index = 18
- Left = 3960
- TabIndex = 33
- Top = 720
- Width = 1455
- End
- Begin VB.Label Label2
- BorderStyle = 1 'Fixed Single
- Caption = "Label2"
- Height = 255
- Index = 7
- Left = 5400
- TabIndex = 24
- Top = 960
- Width = 2175
- End
- Begin VB.Label Label1
- BorderStyle = 1 'Fixed Single
- Caption = "Device Id"
- Height = 255
- Index = 17
- Left = 3960
- TabIndex = 23
- Top = 960
- Width = 1455
- End
- Begin VB.Label Label2
- BorderStyle = 1 'Fixed Single
- Caption = "Label2"
- Height = 255
- Index = 6
- Left = 5400
- TabIndex = 22
- Top = 480
- Width = 2175
- End
- Begin VB.Label Label2
- BorderStyle = 1 'Fixed Single
- Caption = "Label2"
- Height = 255
- Index = 5
- Left = 5400
- TabIndex = 21
- Top = 240
- Width = 2175
- End
- Begin VB.Label Label2
- BorderStyle = 1 'Fixed Single
- Caption = "Label2"
- Height = 255
- Index = 4
- Left = 1560
- TabIndex = 20
- Top = 1200
- Width = 2175
- End
- Begin VB.Label Label2
- BorderStyle = 1 'Fixed Single
- Caption = "Label2"
- Height = 255
- Index = 3
- Left = 1560
- TabIndex = 19
- Top = 960
- Width = 1095
- End
- Begin VB.Label Label2
- BorderStyle = 1 'Fixed Single
- Caption = "Label2"
- Height = 255
- Index = 2
- Left = 1560
- TabIndex = 18
- Top = 720
- Width = 1095
- End
- Begin VB.Label Label2
- BorderStyle = 1 'Fixed Single
- Caption = "Label2"
- Height = 255
- Index = 1
- Left = 1560
- TabIndex = 17
- Top = 480
- Width = 2175
- End
- Begin VB.Label Label2
- BorderStyle = 1 'Fixed Single
- Caption = "Label2"
- Height = 255
- Index = 0
- Left = 1560
- TabIndex = 16
- Top = 240
- Width = 2175
- End
- Begin VB.Label Label1
- BorderStyle = 1 'Fixed Single
- Caption = "Channels"
- Height = 255
- Index = 7
- Left = 3960
- TabIndex = 7
- Top = 480
- Width = 1455
- End
- Begin VB.Label Label1
- BorderStyle = 1 'Fixed Single
- Caption = "Byte per sec"
- Height = 255
- Index = 6
- Left = 3960
- TabIndex = 6
- Top = 240
- Width = 1455
- End
- Begin VB.Label Label1
- BorderStyle = 1 'Fixed Single
- Caption = "Bit per Sample"
- Height = 255
- Index = 5
- Left = 120
- TabIndex = 5
- Top = 1200
- Width = 1455
- End
- Begin VB.Label Label1
- BorderStyle = 1 'Fixed Single
- Caption = "Wave Length"
- Height = 255
- Index = 4
- Left = 120
- TabIndex = 4
- Top = 960
- Width = 1455
- End
- Begin VB.Label Label1
- BorderStyle = 1 'Fixed Single
- Caption = "Wave Position"
- Height = 255
- Index = 3
- Left = 120
- TabIndex = 3
- Top = 720
- Width = 1455
- End
- Begin VB.Label Label1
- BorderStyle = 1 'Fixed Single
- Caption = "Last State"
- Height = 255
- Index = 2
- Left = 120
- TabIndex = 2
- Top = 480
- Width = 1455
- End
- Begin VB.Label Label1
- BorderStyle = 1 'Fixed Single
- Caption = "State"
- Height = 255
- Index = 1
- Left = 120
- TabIndex = 1
- Top = 240
- Width = 1455
- End
- End
- Begin VB.Label Label6
- Alignment = 2 'Center
- BackColor = &H00000000&
- BorderStyle = 1 'Fixed Single
- Caption = "Please report bugs to: jc.quen@station-media.com"
- ForeColor = &H00FFFFFF&
- Height = 495
- Left = 3840
- TabIndex = 40
- Top = 5760
- Width = 3855
- End
- Begin VB.Label Label5
- Alignment = 2 'Center
- BackColor = &H00000000&
- BorderStyle = 1 'Fixed Single
- Caption = "DynaWav-Avi (c) DYNAMEDIA. http://www.station-media.com/dynamedia"
- ForeColor = &H00FFFFFF&
- Height = 495
- Left = 0
- TabIndex = 32
- Top = 5760
- Width = 3735
- End
- Attribute VB_Name = "Form1"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- 'Option Explicit
- Private Sub Command1_Click()
- If DynaWav1.DynaWav_SetVolume(Val(Text3.Text)) = 0 Then MsgBox "Error Returned"
- End Sub
- Private Sub Command10_Click()
- If DynaWav1.DynaWav_SeekEnd = 0 Then MsgBox "Error returned"
- End Sub
- Private Sub Command11_Click()
- CommonDialog1.DialogTitle = "Select a Wave or Avi file"
- CommonDialog1.ShowOpen
- Text1.Text = CommonDialog1.filename
- End Sub
- Private Sub Command12_Click()
- i = DynaWav1.DynaWav_StartFading(Val(Text4.Text), Val(Text5.Text))
- End Sub
- Private Sub Command2_Click()
- DynaWav1.User_Name = ""
- DynaWav1.User_Password = 0
- DynaWav1.Wav_Filename = Text1.Text
- DynaWav1.DynaWav_Init (10)
- Label2(3).Caption = DynaWav1.Wav_Length
- Label7(0).Caption = DynaWav1.Wav_LengthHMS
- Label2(4).Caption = DynaWav1.Wav_BitPerSample
- Label2(5).Caption = DynaWav1.Wav_BytePerSec
- Label2(6).Caption = DynaWav1.Wav_Channels
- Label2(7).Caption = DynaWav1.Wav_DeviceId
- Label2(8).Caption = DynaWav1.Wav_Frequence
- Label2(9).Caption = DynaWav1.Wav_DeviceType
- Label2(10).Caption = DynaWav1.Wav_SuppVolume
- Label2(11).Caption = "Current Volume:" + Str$(DynaWav1.Volume_Value)
- Command1.Enabled = DynaWav1.Wav_SuppVolume
- Command12.Enabled = DynaWav1.Wav_SuppVolume
- Text3.Enabled = DynaWav1.Wav_SuppVolume
- Text4.Enabled = DynaWav1.Wav_SuppVolume
- Text5.Enabled = DynaWav1.Wav_SuppVolume
- End Sub
- Private Sub Command3_Click()
- If Check1.Value = 0 Then
- DynaWav1.Video_HwndHandle = 0
- Else
- DynaWav1.Video_HwndHandle = Picture1.hWnd
- DynaWav1.Video_HwndPosx = 0
- DynaWav1.Video_HwndPosy = 0
- DynaWav1.Video_HwndWidth = Picture1.ScaleWidth 'You can set the size you want
- DynaWav1.Video_HwndHeight = Picture1.ScaleHeight
- End If
- DynaWav1.DynaWav_Play
- End Sub
- Private Sub Command4_Click()
- If DynaWav1.DynaWav_Pause = 0 Then MsgBox "Error returned"
- End Sub
- Private Sub Command5_Click()
- DynaWav1.DynaWav_Stop
- End Sub
- Private Sub Command6_Click()
- If DynaWav1.DynaWav_Close = 0 Then MsgBox "Error Closing"
- End Sub
- Private Sub Command7_Click()
- Label4(0).Caption = ""
- Label4(1).Caption = ""
- End Sub
- Private Sub Command8_Click()
- If DynaWav1.DynaWav_Seek(Val(Text2.Text)) = 0 Then MsgBox "Error returned"
- End Sub
- Private Sub Command9_Click()
- If DynaWav1.DynaWav_SeekStart = 0 Then MsgBox "Error returned"
- End Sub
- Private Sub DynaWav1_FadeRunning()
- Label3.Visible = True Xor Label3.Visible
- Label2(11).Caption = "Current Volume:" + Str$(DynaWav1.Volume_Value)
- End Sub
- Private Sub Dynawav1_WavError(ErrorCode As Long, ErrorString As String)
- Label4(0).Caption = ErrorCode
- Label4(1).Caption = ErrorString
- End Sub
- Private Sub Dynawav1_WavPositionChanged()
- Label2(2).Caption = DynaWav1.Wav_Position
- Label7(1).Caption = DynaWav1.Wav_PositionHMS
- ' Label7(2).Caption = DynaWav1.Wav_PositionLeft
- ' Label7(3).Caption = DynaWav1.Wav_PositionLeftHMS
- End Sub
- Private Sub Dynawav1_WavStateChanged(CurrentState As String, LastState As String)
- Label2(0).Caption = DynaWav1.Wav_State
- Label2(1).Caption = DynaWav1.Wav_LastState
- End Sub
-